import request from '@/router/axios'


// 获取合同创建中的模板列表
export function getTempList(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatedetail/getTempList',
    method: 'get',
    params: query
  })
}

// 获取模板名称列表
export function tempage(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/page',
    method: 'get',
    params: query
  })
}
// 获取合同模板详情
export function getTempListForZdrw(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatedetail/getTempListForZdrw',
    method: 'get',
    params: query
  })
}
// 获取任务书模板详情
export function getTempListForgzrws(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatedetail/getTempListForGzrws',
    method: 'get',
    params: query
  })
}
// 失去焦点保存
export function saveTemplatehang(data) {
  return request({
    url: '/appr-contract/hetongcjacttemplatedetail/saveTemplate',
    method: 'post',
    data: data
  })
}
// 提交模板有效性
export function effective(data) {
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/getEffectiveTemplate',
    method: 'get',
    params: data
  })
}


// 新增模板校验
export function isExsitTemplateName(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/isExsitTemplateName',
    method: 'get',
    params: query
  })
}
// 新增模板
export function saveTemplateName(query){
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/saveTemplate',
    method: 'post',
    data: query
  })
}


// 模板删除
export function deleteBatchtem(data) {
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/deleteBatch',
    method: 'get',
    params: data
  })
}

export function copyTemplateMainAndDetail(data) {
  return request({
    url: '/appr-contract/hetongcjacttemplatemain/copyTemplateMainAndDetail',
    method: 'get',
    params: data
  })
}




